package com.toutou.kotlin.utils

class DeepSeekUtils {
    companion object {
        @JvmStatic
        fun analysisThinkResponse(data: String) : String {
            val startThinkStr = "<think>"
            val endThinkStr = "</think>"
            val pos = data.indexOf("</think>")
            val thinkText = data.substring(startThinkStr.length, pos).replace(Regex("^[\n\r]+|[\n\r]+$"), "")

            val answerText = data.substring(pos + endThinkStr.length).replace(Regex("^[\n\r]+|[\n\r]+$"), "")
            return answerText
        }
    }
}